1. Field of the Invention
The present invention relates to a data transfer control method and apparatus for controlling data transfer between, e.g., a host computer as a high-order data processing apparatus having a high-order data generation processor and low-order data transfer processor, and a printer as a low-order data processing apparatus, and a storage medium that stores a control program for controlling the data transfer control apparatus.
2. Description of the Related Art
Conventionally, in a multi-task environment, data transfer to a printer is one of the roles of a printer driver. The printer driver has some roles, and data transfer is one of them. As for other roles of the printer driver, the printer driver generates RGB bitmap data by rendering in a memory on the basis of a rendering command passed from an application, color-converts rendered RGB data into CMYK data suitable for color reproduction characteristics of a printer, and performs halftoning of CMYK data when grayscale levels reproduced by the printer are limited.
In the multi-task environment, these roles of the printer driver are executed while individual tasks parallelly share a single CPU (central processing unit). But it is a common practice to execute a series of processes of the printer driver in series like rendering, color conversion, halftoning, and data transfer. It is important to these plurality of tasks that constitute the printer driver to achieve parallel processes while synchronouslly progressing the processes like bucket relay for determining the processing speed of the printer driver and total print time.
However, in the aforementioned prior art, since a data transfer processor must continue handshaking with a printer until a required number of bytes of data have been transferred to the printer, the CPU occupation time is prolonged due to the need for monitor and control of I/O ports.
The CPU occupation time of the data transfer processor largely depends on the data reception capability of the printer, e.g., the size of a reception buffer mounted in the printer, the processing performance of a processor mounted in the printer, and the like. For this reason, when the printer is not ready to receive data, it outputs a busy signal, and the data transfer processor must wait (stand by).
Under these circumstances, when data is transferred to a printer with low data reception capability, since the time required for the data transfer processor lengthens considerably compared to a printer with high data reception capability, the progress of processes of other tasks is retarded. As a result of the retarded progress of processes of other tasks, data to be transferred cannot be generated within a predetermined period of time, and the total print time increases. Also, if the printer is an ink-jet type serial printer, a wait (standby) time is produced between print scans and printed portions dry out during this time, resulting in deterioration of image quality such as stripe nonuniformity or the like.
The present invention has been made in consideration of the problems of the prior art, and has as its first object to provide a data transfer control method and apparatus which can implement data transfer without excessively occupying the CPU even when a printer as a low-order data processing apparatus has been switched to another model and its data reception capability has changed accordingly.
It is the second object of the present invention to provide a storage medium that stores a control program which can smoothly control the aforementioned data transfer control apparatus of the present invention.
In order to achieve the first object, a data transfer control method for controlling data transfer between a high-order data processing apparatus having a data generation processor and a data transfer processor, and a low-order data processing apparatus, is characterized by comprising the steps of:
dynamically adjusting a sleep time in accordance with data reception capability of the low-order data processing apparatus; and requesting the sleep time of the data transfer processor.
In order to achieve the first object, a data transfer control apparatus for controlling data transfer between a high-order processing apparatus having a data generation processor and data transfer processor, and a low-order data processing apparatus, is characterized by comprising:
sleep time adjustment means for dynamically adjusting a sleep time in accordance with data reception capability of the low-order data processing apparatus; and request means for requesting the sleep time of the data transfer processor.
In order to achieve the first object, a data transfer control method for controlling data transfer between a high-order data processing apparatus having a data generation processor and data transfer processor, and a low-order data processing apparatus, is characterized by comprising the steps of:
dynamically adjusting a sleep time in accordance with a time required for other tasks that execute processes parallelly; and requesting the sleep time of the data transfer processor.
In order to achieve the first object, a data transfer control apparatus for controlling data transfer between a high-order processing apparatus having a data generation processor and data transfer processor, and a low-order data processing apparatus, is characterized by comprising:
sleep time adjustment means for dynamically adjusting a sleep time requested in accordance with a time required for other tasks that execute processes parallelly; and request means for requesting the sleep time of the data transfer processor.
In order to achieve the first object, a data transfer control method for controlling data transfer between a high-order processing apparatus having a data generation processor and data transfer processor, and a low-order data processing apparatus, is characterized by comprising:
the time measurement step of measuring a time elapsed from a previous data transfer request to a current data transfer request;
the first comparison step of comparing the elapsed time measured in the time measurement step with an elapsed time between two previous data transfer requests;
the sleep time adjustment step of determining that a processing load on the data generation processor has become heavier and prolonging a sleep time requested of the data transfer processor when the current elapsed time is longer than the previous elapsed time, and of determining that the processing load on the data generation processor has become lighter and shortening the sleep time requested of the data transfer processor when the current elapsed time is shorter than the previous elapsed time;
the time computation step of computing a required transfer time for transfer per byte on the basis of a total required time upon transferring a data block having an arbitrary number of bytes;
the second comparison step of comparing the required transfer time per byte with a plurality of (N) threshold values determined arbitrarily; and
the application step of applying a time obtained by dividing the required sleep time by the number N of threshold values prepared in advance when each threshold value condition is satisfied as a result of comparison in the second comparison step.
In order to achieve the first object, a data transfer control apparatus for controlling data transfer between a high-order processing apparatus having a data generation processor and data transfer processor, and a low-order data processing apparatus, is characterized by comprising:
time measurement means for measuring a time elapsed from a previous data transfer request to a current data transfer request;
first comparison means for comparing the elapsed time measured by said time measurement means with an elapsed time between two previous data transfer requests;
sleep time adjustment means for determining that a processing load on the high-order data generation processor has become heavier and prolonging a sleep time requested of the low-order data transfer processor when the current elapsed time is longer than the previous elapsed time, and for determining that the processing load on the high-order data generation processor has become lighter and shortening the sleep time requested of the low-order data transfer processor when the current elapsed time is shorter than the previous elapsed time;
time computation means for computing a required transfer time for transfer per byte on the basis of a total required time upon transferring a data block having an arbitrary number of bytes;
second comparison means for comparing the required transfer time per byte with a plurality of (N) threshold values determined arbitrarily; and
application means for applying a time obtained by dividing the required sleep time by the number N of threshold values prepared in advance when each threshold value condition is satisfied as a result of comparison of said second comparison means.
In order to achieve the second object, a storage medium stores a control program for controlling a data transfer control apparatus for controlling data transfer between a high-order data processing apparatus having a data generation processor and a transfer processor, and a low-order data processing apparatus, and said control program is characterized by comprising a control module of the steps of:
dynamically adjusting a sleep time in accordance with data reception capability of the low-order data processing apparatus; and
requesting the sleep time of the data transfer processor.
In order to achieve the second object, a storage medium stores a control program for controlling a data transfer control apparatus for controlling data transfer between a high-order processing apparatus having a data generation processor and a transfer processor, and a low-order data processing apparatus, and said control program is characterized by comprising a control module of the steps of:
measuring a time elapsed from a previous data transfer to a current data transfer;
comparing the measured elapsed time with an elapsed time between two previous data transfer requests;
determining that a processing load on the data generation processor has become heavier and prolong a sleep time requested of the data transfer processor when the current elapsed time is longer than the previous elapsed time, or determining that the processing load on the data generation processor has become lighter and shorten the sleep time requested of the data transfer processor when the current elapsed time is shorter than the previous elapsed time;
computing a required transfer time for transfer per byte on the basis of a total required time upon transferring a data block having an arbitrary number of bytes;
comparing the required transfer time per byte with a plurality of (N) threshold values determined arbitrarily; and
applying a time obtained by dividing the required sleep time by the number N of threshold values prepared in advance when each threshold value condition is satisfied as a result of comparison.
In the present invention, for example, a host computer can be used as the high-order data processing apparatus. Also, for example, a printer can be used as the low-order data processing apparatus.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.